package com.zs.zcerp.approval.mapper;

import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.zs.zcerp.approval.entity.EmpEntity;
import com.zs.zcerp.approval.entity.QhBasestdDEntity;
import com.zs.zcerp.approval.entity.QhBasestdDEntity;
import org.apache.ibatis.annotations.Param;

import java.util.List;

/**
 * ${comments}
 * 
 * @author Henry
 * @email *****@mail.com
 * @date 2021-04-09 20:58:44
 */
public interface QhBasestdDMapper extends BaseMapper<QhBasestdDEntity> {

    /**
     * 查找分类详细信息
     *
     * @param page 分页对象
     * @param qhBasestdDEntity 分类，用于传递查询条件
     * @return Ipage
     */
    <T> IPage<QhBasestdDEntity> findClassifyDetailPage(Page<T> page, @Param("qhBasestdDEntity") QhBasestdDEntity qhBasestdDEntity);


    long countClassifyDetail(@Param("qhBasestdDEntity") QhBasestdDEntity qhBasestdDEntity);


    /**
     * 查找分类详细信息
     *
     * @param qhBasestdDEntity 分类对象，用于传递查询条件
     * @return List<QhBasestdDEntity>
     */
    List<QhBasestdDEntity> findClassifyDetail(@Param("qhBasestdDEntity") QhBasestdDEntity qhBasestdDEntity);

    /**
     * 通过流程编号查找流程
     *
     * @param basestdNo 流程编号
     * @return 流程
     */
    QhBasestdDEntity findByBasestdNo(String basestdNo);

    /**
     * 签核人员集合
     * @param basestdNo
     * @param orgId
     * @return
     */
    List<QhBasestdDEntity> findbaseStdDetails(@Param("basestdNo") String basestdNo, @Param("orgId") String orgId);

    void bacthUpdate(@Param("baseList")  List<QhBasestdDEntity> baseList);

    List<EmpEntity> findEmpNoAndNames();

    void updateNamesbychkUser(@Param("empEntity") EmpEntity empEntity);

    void updateToUserCnamebychkUser(@Param("empEntity") EmpEntity empEntity);

    void updateGrtUserCname(@Param("empEntity") EmpEntity empEntity);

    /**
     *  批量跟换签核人 所有流程里面的账号
     * @param qhBasestdDEntity
     */
    void updateChkUser(@Param("qhBasestdDEntity") QhBasestdDEntity qhBasestdDEntity);
}
